/**
 * @USER: Administrator
 * @DATE: 2024/10/5 上午10:37
 * @VERSION: 1.0.0
 */
public class LC2535 {
    public static void main(String[] args) {

    }

    public int differenceOfSum(int[] nums) {
        int sum1 = 0, sum2 = 0;
        for (int num : nums) {
            if (num>=10) {
                sum1 += num;
                String s = num + "";
                for (int i = 0; i < s.length(); i++) {
                    sum2 += s.charAt(i)-'0';
                }
            }
        }
        return Math.abs(sum1 - sum2);
    }

}
